<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="en" name="language">
	<title>widget</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">

</head>

<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>


<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>

<main id="widget">
<h1 class="title">widget</h1>
<p class="subtitle" id="x11-widgets">X11 Widgets</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#xcolorbrowserwidget" id="id25">XColorBrowserWidget</a></p></li>
<li><p><a class="reference internal" href="#xcommandwidget" id="id26">XCommandWidget</a></p></li>
<li><p><a class="reference internal" href="#xconfirmwidget" id="id27">XConfirmWidget</a></p></li>
<li><p><a class="reference internal" href="#xdialogwidget" id="id28">XDialogWidget</a></p></li>
<li><p><a class="reference internal" href="#xfilebrowserwidget" id="id29">XFileBrowserWidget</a></p></li>
<li><p><a class="reference internal" href="#xfontbrowserwidget" id="id30">XFontBrowserWidget</a></p></li>
<li><p><a class="reference internal" href="#xinfowidget" id="id31">XInfoWidget</a></p></li>
<li><p><a class="reference internal" href="#xlistbrowserwidget" id="id32">XListBrowserWidget</a></p></li>
<li><p><a class="reference internal" href="#xmenuwidget" id="id33">XMenuWidget</a></p></li>
<li><p><a class="reference internal" href="#xmonitorwidget" id="id34">XMonitorWidget</a></p></li>
<li><p><a class="reference internal" href="#xnoticewidget" id="id35">XNoticeWidget</a></p></li>
<li><p><a class="reference internal" href="#xpreferenceswidget" id="id36">XPreferencesWidget</a></p></li>
<li><p><a class="reference internal" href="#xtextviewwidget" id="id37">XTextViewWidget</a></p></li>
</ul>
</div>
<section id="xcolorbrowserwidget">
<h1><a class="toc-backref" href="#id25">XColorBrowserWidget</a></h1>
<section id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXColorBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                char *reply );</pre>
</section>
<section id="description">
<h2>Description</h2>
<p>Method MagickXColorBrowserWidget displays a Color Browser widget with a color
query to the user.  The user keys a reply and presses the Action or Cancel
button to exit.  The typed text is returned as the reply function parameter.</p>
<p>The format of the MagickXColorBrowserWidget method is:</p>
<pre class="literal-block">void MagickXColorBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                char *reply );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>action:</dt>
<dd><p>Specifies a pointer to the action of this widget.</p>
</dd>
<dt>reply:</dt>
<dd><p>The response from the user is returned in this parameter.</p>
</dd>
</dl>
</section>
</section>
<section id="xcommandwidget">
<h1><a class="toc-backref" href="#id26">XCommandWidget</a></h1>
<section id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">int MagickXCommandWidget( Display *display, MagickXWindows *windows,
                          const char ** selections, XEvent *event );</pre>
</section>
<section id="id2">
<h2>Description</h2>
<p>Method MagickXCommandWidget maps a menu and returns the command pointed to by
the user when the button is released.</p>
<p>The format of the MagickXCommandWidget method is:</p>
<pre class="literal-block">int MagickXCommandWidget( Display *display, MagickXWindows *windows,
                          const char ** selections, XEvent *event );</pre>
<dl class="simple">
<dt>selection_number:</dt>
<dd><p>Specifies the number of the selection that the
user choose.</p>
</dd>
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>selections:</dt>
<dd><p>Specifies a pointer to one or more strings that comprise
the choices in the menu.</p>
</dd>
<dt>event:</dt>
<dd><p>Specifies a pointer to a X11 XEvent structure.</p>
</dd>
</dl>
</section>
</section>
<section id="xconfirmwidget">
<h1><a class="toc-backref" href="#id27">XConfirmWidget</a></h1>
<section id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">int MagickXConfirmWidget( Display *display, MagickXWindows *windows, const char *reason,
                          const char *description );</pre>
</section>
<section id="id4">
<h2>Description</h2>
<p>Method MagickXConfirmWidget displays a Confirm widget with a notice to the user.
The function returns -1 if Dismiss is pressed, 0 for Cancel, and 1 for
Yes.</p>
<p>The format of the MagickXConfirmWidget method is:</p>
<pre class="literal-block">int MagickXConfirmWidget( Display *display, MagickXWindows *windows, const char *reason,
                          const char *description );</pre>
<dl class="simple">
<dt>status:</dt>
<dd><p>Method MagickXConfirmWidget returns True if the user presses Yes
otherwise False is returned.</p>
</dd>
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>reason:</dt>
<dd><p>Specifies the message to display before terminating the
program.</p>
</dd>
<dt>description:</dt>
<dd><p>Specifies any description to the message.</p>
</dd>
</dl>
</section>
</section>
<section id="xdialogwidget">
<h1><a class="toc-backref" href="#id28">XDialogWidget</a></h1>
<section id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">int MagickXDialogWidget( Display *display, MagickXWindows *windows, const char *action,
                         const char *query, char *reply );</pre>
</section>
<section id="id6">
<h2>Description</h2>
<p>Method MagickXDialogWidget displays a Dialog widget with a query to the user.
The user keys a reply and presses the Ok or Cancel button to exit.  The
typed text is returned as the reply function parameter.</p>
<p>The format of the MagickXDialogWidget method is:</p>
<pre class="literal-block">int MagickXDialogWidget( Display *display, MagickXWindows *windows, const char *action,
                         const char *query, char *reply );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>action:</dt>
<dd><p>Specifies a pointer to the action of this widget.</p>
</dd>
<dt>query:</dt>
<dd><p>Specifies a pointer to the query to present to the user.</p>
</dd>
<dt>reply:</dt>
<dd><p>The response from the user is returned in this parameter.</p>
</dd>
</dl>
</section>
</section>
<section id="xfilebrowserwidget">
<h1><a class="toc-backref" href="#id29">XFileBrowserWidget</a></h1>
<section id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXFileBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                               char *reply );</pre>
</section>
<section id="id8">
<h2>Description</h2>
<p>Method MagickXFileBrowserWidget displays a File Browser widget with a file query
to the user.  The user keys a reply and presses the Action or Cancel button
to exit.  The typed text is returned as the reply function parameter.</p>
<p>The format of the MagickXFileBrowserWidget method is:</p>
<pre class="literal-block">void MagickXFileBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                               char *reply );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>action:</dt>
<dd><p>Specifies a pointer to the action of this widget.</p>
</dd>
<dt>reply:</dt>
<dd><p>The response from the user is returned in this parameter.</p>
</dd>
</dl>
</section>
</section>
<section id="xfontbrowserwidget">
<h1><a class="toc-backref" href="#id30">XFontBrowserWidget</a></h1>
<section id="id9">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXFontBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                               char *reply );</pre>
</section>
<section id="id10">
<h2>Description</h2>
<p>Method MagickXFontBrowserWidget displays a Font Browser widget with a font query
to the user.  The user keys a reply and presses the Action or Cancel button
to exit.  The typed text is returned as the reply function parameter.</p>
<p>The format of the MagickXFontBrowserWidget method is:</p>
<pre class="literal-block">void MagickXFontBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                               char *reply );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>action:</dt>
<dd><p>Specifies a pointer to the action of this widget.</p>
</dd>
<dt>reply:</dt>
<dd><p>The response from the user is returned in this parameter.</p>
</dd>
</dl>
</section>
</section>
<section id="xinfowidget">
<h1><a class="toc-backref" href="#id31">XInfoWidget</a></h1>
<section id="id11">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXInfoWidget( Display *display, MagickXWindows *windows, const char *activity );</pre>
</section>
<section id="id12">
<h2>Description</h2>
<p>Method MagickXInfoWidget displays text in the Info widget.  The purpose is to
inform the user that what activity is currently being performed (e.g.
reading an image, rotating an image, etc.).</p>
<p>The format of the MagickXInfoWidget method is:</p>
<pre class="literal-block">void MagickXInfoWidget( Display *display, MagickXWindows *windows, const char *activity );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>activity:</dt>
<dd><p>This character string reflects the current activity and is
displayed in the Info widget.</p>
</dd>
</dl>
</section>
</section>
<section id="xlistbrowserwidget">
<h1><a class="toc-backref" href="#id32">XListBrowserWidget</a></h1>
<section id="id13">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXListBrowserWidget( Display *display, MagickXWindows *windows,
                               MagickXWindowInfo *window_info, const char ** list,
                               const char *action, const char *query, char *reply );</pre>
</section>
<section id="id14">
<h2>Description</h2>
<p>Method MagickXListBrowserWidget displays a List Browser widget with a query to
the user.  The user keys a reply or select a reply from the list.  Finally,
the user presses the Action or Cancel button to exit.  The typed text is
returned as the reply function parameter.</p>
<p>The format of the MagickXListBrowserWidget method is:</p>
<pre class="literal-block">void MagickXListBrowserWidget( Display *display, MagickXWindows *windows,
                               MagickXWindowInfo *window_info, const char ** list,
                               const char *action, const char *query, char *reply );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>list:</dt>
<dd><p>Specifies a pointer to an array of strings.  The user can
select from these strings as a possible reply value.</p>
</dd>
<dt>action:</dt>
<dd><p>Specifies a pointer to the action of this widget.</p>
</dd>
<dt>query:</dt>
<dd><p>Specifies a pointer to the query to present to the user.</p>
</dd>
<dt>reply:</dt>
<dd><p>The response from the user is returned in this parameter.</p>
</dd>
</dl>
</section>
</section>
<section id="xmenuwidget">
<h1><a class="toc-backref" href="#id33">XMenuWidget</a></h1>
<section id="id15">
<h2>Synopsis</h2>
<pre class="literal-block">int MagickXMenuWidget( Display *display, MagickXWindows *windows, const char *title,
                       const char ** selections, char *item );</pre>
</section>
<section id="id16">
<h2>Description</h2>
<p>Method MagickXMenuWidget maps a menu and returns the command pointed to by the
user when the button is released.</p>
<p>The format of the MagickXMenuWidget method is:</p>
<pre class="literal-block">int MagickXMenuWidget( Display *display, MagickXWindows *windows, const char *title,
                       const char ** selections, char *item );</pre>
<dl class="simple">
<dt>selection_number:</dt>
<dd><p>Specifies the number of the selection that the
user choose.</p>
</dd>
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>title:</dt>
<dd><p>Specifies a character string that describes the menu selections.</p>
</dd>
<dt>selections:</dt>
<dd><p>Specifies a pointer to one or more strings that comprise
the choices in the menu.</p>
</dd>
<dt>item:</dt>
<dd><p>Specifies a character array.  The item selected from the menu
is returned here.</p>
</dd>
</dl>
</section>
</section>
<section id="xmonitorwidget">
<h1><a class="toc-backref" href="#id34">XMonitorWidget</a></h1>
<section id="id17">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXMonitorWidget( Display *display, MagickXWindows *windows, const char *task,
                           const magick_int64_t quantum, const magick_uint64_t span );</pre>
</section>
<section id="id18">
<h2>Description</h2>
<p>Method MagickXMonitorWidget displays the progress a task is making in
completing a task.  A span of zero toggles the active status.  An inactive
state disables the progress monitor.</p>
<p>The format of the MagickXMonitorWidget method is:</p>
<pre class="literal-block">void MagickXMonitorWidget( Display *display, MagickXWindows *windows, const char *task,
                           const magick_int64_t quantum, const magick_uint64_t span );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>task:</dt>
<dd><p>Identifies the task in progress.</p>
</dd>
<dt>quantum:</dt>
<dd><p>Specifies the quantum position within the span which represents
how much progress has been made in completing a task.</p>
</dd>
<dt>span:</dt>
<dd><p>Specifies the span relative to completing a task.</p>
</dd>
</dl>
</section>
</section>
<section id="xnoticewidget">
<h1><a class="toc-backref" href="#id35">XNoticeWidget</a></h1>
<section id="id19">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXNoticeWidget( Display *display, MagickXWindows *windows, const char *reason,
                          const char *description );</pre>
</section>
<section id="id20">
<h2>Description</h2>
<p>Method MagickXNoticeWidget displays a Notice widget with a notice to the user.
The function returns when the user presses the &quot;Dismiss&quot; button.</p>
<p>The format of the MagickXNoticeWidget method is:</p>
<pre class="literal-block">void MagickXNoticeWidget( Display *display, MagickXWindows *windows, const char *reason,
                          const char *description );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>reason:</dt>
<dd><p>Specifies the message to display before terminating the
program.</p>
</dd>
<dt>description:</dt>
<dd><p>Specifies any description to the message.</p>
</dd>
</dl>
</section>
</section>
<section id="xpreferenceswidget">
<h1><a class="toc-backref" href="#id36">XPreferencesWidget</a></h1>
<section id="id21">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int MagickXPreferencesWidget( Display *display,
                                       <a class="reference external" href="../api/types.html#magickxresourceinfo">MagickXResourceInfo</a> *resource_info,
                                       MagickXWindows *windows );</pre>
</section>
<section id="id22">
<h2>Description</h2>
<p>Method MagickXPreferencesWidget displays a Preferences widget with program
preferences.  If the user presses the Apply button, the preferences are
stored in a configuration file in the users' home directory.</p>
<p>The format of the MagickXPreferencesWidget method is:</p>
<pre class="literal-block">unsigned int MagickXPreferencesWidget( Display *display,
                                       <a class="reference external" href="../api/types.html#magickxresourceinfo">MagickXResourceInfo</a> *resource_info,
                                       MagickXWindows *windows );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>resource_info:</dt>
<dd><p>Specifies a pointer to a X11 MagickXResourceInfo structure.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
</dl>
</section>
</section>
<section id="xtextviewwidget">
<h1><a class="toc-backref" href="#id37">XTextViewWidget</a></h1>
<section id="id23">
<h2>Synopsis</h2>
<pre class="literal-block">void MagickXTextViewWidget( Display *display, const <a class="reference external" href="../api/types.html#magickxresourceinfo">MagickXResourceInfo</a> *resource_info,
                            MagickXWindows *windows, const unsigned int mono,
                            const char *title, const char ** textlist );</pre>
</section>
<section id="id24">
<h2>Description</h2>
<p>Method MagickXTextViewWidget displays text in a Text View widget.</p>
<p>The format of the MagickXTextViewWidget method is:</p>
<pre class="literal-block">void MagickXTextViewWidget( Display *display, const <a class="reference external" href="../api/types.html#magickxresourceinfo">MagickXResourceInfo</a> *resource_info,
                            MagickXWindows *windows, const unsigned int mono,
                            const char *title, const char ** textlist );</pre>
<dl class="simple">
<dt>display:</dt>
<dd><p>Specifies a connection to an X server;  returned from
XOpenDisplay.</p>
</dd>
<dt>resource_info:</dt>
<dd><p>Specifies a pointer to a X11 MagickXResourceInfo structure.</p>
</dd>
<dt>window:</dt>
<dd><p>Specifies a pointer to a MagickXWindows structure.</p>
</dd>
<dt>mono:</dt>
<dd><p>Use mono-spaced font when displaying text.</p>
</dd>
<dt>title:</dt>
<dd><p>This character string is displayed at the top of the widget
window.</p>
</dd>
<dt>textlist:</dt>
<dd><p>This string list is displayed within the Text View widget.</p>
</dd>
</dl>
</section>
</section>
</main>


<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002-2025<!--SPONSOR_LOGO--></p>
</div>

</main>
</body>
</html>
